The present invention relates to the assessing of the aptitude that a body has in opposing the passage of a product. It applies particularly well to roof rocks of natural oil deposits. The aptitude of a roof rock to oppose the passage of hydrocarbons is an essential parameter in the oil-bearing assessment of geological formations. A good roof rock will oppose the passage of hydrocarbons whereas a poor roof rock will let hydrocarbons readily pass therethrough. At the present time there exists no means for defining this property in a simple and reliable way. The present invention provides a method and device for classifying roof rocks in particular as a function of their aptitude to oppose the passage of hydrocarbons under the conditions of a dysmigration test carried out in the laboratory on rock samples. By dysmigration is meant the physical phenomenon of the leaking of a product such as hydrocarbons from a reservoir through a roof rock.